function T = dynamic_resid_tt(T, y, x, params, steady_state, it_)
% function T = dynamic_resid_tt(T, y, x, params, steady_state, it_)
%
% File created by Dynare Preprocessor from .mod file
%
% Inputs:
%   T             [#temp variables by 1]     double  vector of temporary terms to be filled by function
%   y             [#dynamic variables by 1]  double  vector of endogenous variables in the order stored
%                                                    in M_.lead_lag_incidence; see the Manual
%   x             [nperiods by M_.exo_nbr]   double  matrix of exogenous variables (in declaration order)
%                                                    for all simulation periods
%   steady_state  [M_.endo_nbr by 1]         double  vector of steady state values
%   params        [M_.param_nbr by 1]        double  vector of parameter values in declaration order
%   it_           scalar                     double  time period for exogenous variables for which
%                                                    to evaluate the model
%
% Output:
%   T           [#temp variables by 1]       double  vector of temporary terms
%

assert(length(T) >= 43);

T(1) = (-1);
T(2) = 1-1/params(2);
T(3) = T(1)/params(4);
T(4) = 1/params(4)-1/params(2);
T(5) = exp(y(54)*T(4));
T(6) = params(1)*exp(T(3)*y(53))*T(5);
T(7) = y(23)*exp(y(54))/y(1);
T(8) = 1/params(2)-params(3);
T(9) = T(7)^T(8);
T(10) = (params(10)-1)/params(10);
T(11) = y(50)^T(10);
T(12) = (params(6)-y(34))/y(29);
T(13) = y(7)^params(12);
T(14) = y(34)^(1-params(12));
T(15) = exp((1-params(12))*y(46));
T(16) = 1-1/params(15);
T(17) = params(18)/T(16);
T(18) = y(32)/y(7);
T(19) = 1/y(11);
T(20) = y(62)+1-params(13)-y(32)*y(63)/y(7);
T(21) = y(64)-y(44)*y(66)+y(45)*T(20);
T(22) = params(12)/params(11);
T(23) = T(1)/params(15);
T(24) = (1-params(12))*(1-1/params(11));
T(25) = (1-params(12))/params(11);
T(26) = params(14)/2;
T(27) = T(26)*(exp(y(37)-params(44))-1)^2;
T(28) = y(121)/exp(y(123));
T(29) = y(28)/params(46);
T(30) = y(121)*exp(y(126)-y(123))*exp(y(71));
T(31) = (1-params(9))/params(9);
T(32) = 1/params(10);
T(33) = T(31)*exp(y(49)*(1-T(32)));
T(34) = y(30)/y(50);
T(35) = T(34)^T(32);
T(36) = params(33)*sqrt(1-params(35)^2);
T(37) = exp(y(18))+params(20)*(exp(y(83))-exp(y(18)));
T(38) = exp(y(18))+params(20)*(exp(y(86))-exp(y(18)));
T(39) = 1/(1+params(5));
T(40) = (params(4)-1)/params(4);
T(41) = params(5)/(1+params(5));
T(42) = T(39)*y(29)^T(40)+T(41)*(params(6)-y(34))^T(40);
T(43) = params(4)/(params(4)-1);

end
